package edu.hhu.innerac.sparkm;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaSparkContext;

public abstract class SparkProgress {
	public SparkConf sparkConf = null;
	public JavaSparkContext jsc = null;
	public SparkProgress(String proName){
//		init(proName);
	}
	public SparkProgress(){
//		init("test");
	}
	
	public void init(String proName){
		sparkConf = new SparkConf().setAppName(proName).setMaster("local");
		jsc = new JavaSparkContext(sparkConf);
		System.out.println("init spark");
	}
	
	public void start(){
		progress();
		jsc.stop();
	}
	
	public abstract void progress();
}
